﻿Public Class NewProjectForm

    Private Sub NewProjectWizard_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        TextBoxUDKDir.Text = Globals.kDefaultUDKFolder
    End Sub

    Private Sub BrowseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BrowseButton.Click
        ' Choose the directory
        Dim folderdialog = New FolderBrowserDialog
        If folderdialog.ShowDialog() = Windows.Forms.DialogResult.OK Then
            TextBoxUDKDir.Text = folderdialog.SelectedPath
        End If
    End Sub

    Private Sub FinishButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles FinishButton.Click
        Dim projectname As String = TextBoxProjectName.Text
        Dim udkfolder As String = TextBoxUDKDir.Text
        Dim project As Project.Project = ProjectManager.CreateProject(projectname, udkfolder)
        Globals.CurrentProject = project

        Me.Hide()
    End Sub

    Private Sub BackButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackButton.Click
    End Sub

    Private Sub CloseButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseButton.Click
        ' Reset fields
        Me.Hide()
    End Sub

End Class